]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: Don't allow exiting the overview if we have a DND drag
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 27 Mar 2013 17:31:43 +0000 (13:31 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 12 May 2013 18:40:05 +0000 (14:40 -0400)
Otherwise, people can drag app icons or window thumbnails out of
the overview, and it just looks weird.

https://bugzilla.gnome.org/show_bug.cgi?id=698484

js/ui/overview.js

index c3ae2bbc8f3b2f5e09665eaa9f6c69a4d3cbe263..12785adc8a8b5bc7e322dd5e38e3474325b7e0fe 100644 (file)
@@ -435,6 +435,7 @@ const Overview = new Lang.Class({
 
     beginItemDrag: function(source) {
         this.emit('item-drag-begin');
+        this._inDrag = true;
     },
 
     cancelledItemDrag: function(source) {
@@ -443,10 +444,12 @@ const Overview = new Lang.Class({
 
     endItemDrag: function(source) {
         this.emit('item-drag-end');
+        this._inDrag = false;
     },
 
     beginWindowDrag: function(source) {
         this.emit('window-drag-begin');
+        this._inDrag = true;
     },
 
     cancelledWindowDrag: function(source) {
@@ -455,6 +458,7 @@ const Overview = new Lang.Class({
 
     endWindowDrag: function(source) {
         this.emit('window-drag-end');
+        this._inDrag = false;
     },
 
     // show:
@@ -578,6 +582,8 @@ const Overview = new Lang.Class({
     shouldToggleByCornerOrButton: function() {
         if (this.animationInProgress)
             return false;
+        if (this._inDrag)
+            return false;
         if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > OVERVIEW_ACTIVATION_TIMEOUT)
             return true;
         return false;